package com.accp.hotevent.service;

import com.accp.hotevent.dao.UserDao;
import com.accp.hotevent.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public void add(User user){
        userDao.add(user);
    }

    public void update(User user){
        userDao.update(user);
    }

    public User login(String email,
               String password){
        return userDao.login(email,password);
    }
    public User getById(Integer id){
        return userDao.getById(id);
    }
    public List<User> getList(User user){
        return userDao.getList(user);
    }
}
